﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using lgweb.common;
using LGCourt.Logic.NBL.DBEntities;
using LGCourt.Logic.BLL;

namespace lgweb.inside.culture
{
    public partial class index : NeedValidatePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);
            if (!this.IsPostBack)
            {               
                GetList();
            }
        }
        private void GetList()
        {

            ColInfo colInfoBLL = new ColInfo();
            QueryCondition queryParam = new QueryCondition();
            queryParam.PageSize = 4;
            queryParam.ClassID = 3;           
            List<LGFY_Platform_Articles> newsList1 = colInfoBLL.GetNewsInfoTop(queryParam);
            if (newsList1 != null)
            {
                this.rptList1.DataSource = newsList1;
                this.rptList1.DataBind();
            }

            queryParam.ClassID = 4;
            List<LGFY_Platform_Articles> newsList2 = colInfoBLL.GetNewsInfoTop(queryParam);
            if (newsList2 != null)
            {
                this.rptList2.DataSource = newsList2;
                this.rptList2.DataBind();
            }
            queryParam.ClassID = 5;
            List<LGFY_Platform_Articles> newsList3 = colInfoBLL.GetNewsInfoTop(queryParam);
            if (newsList3 != null)
            {
                this.rptList3.DataSource = newsList3;
                this.rptList3.DataBind();
            }
            queryParam.ClassID = 6;
            List<LGFY_Platform_Articles> newsList4 = colInfoBLL.GetNewsInfoTop(queryParam);
            if (newsList4 != null)
            {
                this.rptList4.DataSource = newsList4;
                this.rptList4.DataBind();
            }
        }
    }
}